package synchro;

/**
 *
 * @author boomar
 */
class monThread extends Thread {

    Registre leRegistre;

    monThread(Registre R) {
        leRegistre = R;
    }

    @Override
    public void run() {
        for (int turn = 0; turn < 1000000; turn++) {
            long Tab[];

            Tab = leRegistre.get();
            for (int i = 0; i < Tab.length; i++) {
                Tab[i]++;
            }
            leRegistre.set(Tab);
        }
    }
}
